<?php

namespace App\Modules\Company\Model;

use App\Modules\BaseModel;

class CompanyOemModel extends BaseModel
{
    /**
     * @var string
     */
    protected $table = 'company_oem';

    /**
     * @var string
     */
    protected $connection = 'microservice';

    /**
     * 获取公司配置信息
     * @param string $company_id
     * @return \Hyperf\Database\Model\Builder|\Hyperf\Database\Model\Model|object|null
     */
    public static function fetchOne(string $company_id)
    {
        return self::where('company_id', (int)$company_id)->first();
    }
}